﻿using System.ComponentModel;
using System.ComponentModel.DataAnnotations;

namespace StarsAdmin.Application.Auth.Dtos
{
    /// <summary>
    /// 登录模型
    /// </summary>
    public class LoginInput
    {
        /// <summary>
        /// 用户名
        /// </summary>
        [Required(ErrorMessage = "用户名不能为空"), MinLength(2, ErrorMessage = "用户名不能少于 2 位字符")]
        [DefaultValue("admin")]
        public string UserName { get; set; }

        /// <summary>
        /// 密码
        /// </summary>
        [Required(ErrorMessage = "用户名不能为空"), MinLength(6, ErrorMessage = "密码不能少于 6 位字符")]
        [DefaultValue("123456")]
        public string Password { get; set; }
    }
}